package com.yang.singleton.inner;

import com.yang.singleton.hungry.HungrySingleton;

/**
 * 静态内部类
 * @author yang
 * @version 0.1
 * @date 2019/4/12
 */
public class InnerSingleton {

    private InnerSingleton() {}

    public static InnerSingleton getInstance() {
        return Inner.INSTANCE;
    }

    private static class Inner {
        private static final InnerSingleton INSTANCE = new InnerSingleton();
    }
}
